package com.tencreat.service.mall;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tencreat.common.core.domain.model.ReqIdParam;
import com.tencreat.common.core.domain.model.ReqIdsParam;
import com.tencreat.domain.mall.MallOrderGoods;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 商城订单商品Service接口
 *
 * @author tencreat
 * @date 2021-08-13
 */
public interface IMallOrderGoodsService extends IService<MallOrderGoods> {
    /**
     * 查询订单商品
     *
     * @param id 订单商品ID
     * @return 订单商品
     */
    public MallOrderGoods selectMallOrderGoodsById(ReqIdParam id);

    /**
     * 查询订单商品列表
     *
     * @param mallOrderGoods 订单商品
     * @return 订单商品集合
     */
    public List<MallOrderGoods> selectMallOrderGoodsList(MallOrderGoods mallOrderGoods);

    /**
     * 新增订单商品
     *
     * @param mallOrderGoods 订单商品
     * @return 结果
     */
    public int insertMallOrderGoods(MallOrderGoods mallOrderGoods);

    /**
     * 修改订单商品
     *
     * @param mallOrderGoods 订单商品
     * @return 结果
     */
    public int updateMallOrderGoods(MallOrderGoods mallOrderGoods);

    /**
     * 批量删除订单商品
     *
     * @param ids 需要删除的订单商品ID
     * @return 结果
     */
    public int deleteMallOrderGoodsByIds(ReqIdsParam ids);

    /**
     * 删除订单商品信息
     *
     * @param id 订单商品ID
     * @return 结果
     */
    public int deleteMallOrderGoodsById(ReqIdParam id);

    void updateOrderTypeByGoodsNorms(String orderSn, Long goodsId, Long normsId, int OrderStatus, LocalDateTime day);
}
